package cn.tedu.department.mapper;

import cn.tedu.department.pojo.dto.DepartmentDTO;
import cn.tedu.department.pojo.vo.DepartmentVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface DepartmentMapper {
    /**
     * 添加部门
     *
     * @param departmentDTO
     */
    void insert(DepartmentDTO departmentDTO);

    /**
     * 查询所有部门
     *
     * @param departmentDTO
     * @return
     */
    List<DepartmentVO> selectAll(DepartmentDTO departmentDTO);

    /**
     * 根据PID查询部门
     *
     * @param pid
     * @return
     */
    List<DepartmentVO> selectByPid(Integer pid);

    void update(DepartmentDTO departmentDTO);

    void delete(DepartmentDTO departmentDTO);
}
